package com.hjm.project.salaryPlan.aaoCashbackDetails.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.salaryPlan.aaoCashbackDetails.mapper.AaoCashbackDetailsMapper;
import com.hjm.project.salaryPlan.aaoCashbackDetails.domain.AaoCashbackDetails;
import com.hjm.project.salaryPlan.aaoCashbackDetails.service.IAaoCashbackDetailsService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 底薪计划奖励Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-04-12
 */
@Service
public class AaoCashbackDetailsServiceImpl implements IAaoCashbackDetailsService {
    @Resource
    private AaoCashbackDetailsMapper aaoCashbackDetailsMapper;

    /**
     * 查询底薪计划奖励
     * 
     * @param id 底薪计划奖励ID
     * @return 底薪计划奖励
     */
    @Override
    public AaoCashbackDetails selectAaoCashbackDetailsById(Integer id) {
        return aaoCashbackDetailsMapper.selectAaoCashbackDetailsById(id);
    }

    /**
     * 查询底薪计划奖励列表
     * 
     * @param aaoCashbackDetails 底薪计划奖励
     * @return 底薪计划奖励
     */
    @Override
    public List<AaoCashbackDetails> selectAaoCashbackDetailsList(AaoCashbackDetails aaoCashbackDetails) {
        return aaoCashbackDetailsMapper.selectAaoCashbackDetailsList(aaoCashbackDetails);
    }

    /**
     * 查询底薪计划奖励列表
     *
     * @param aaoCashbackDetails 底薪计划奖励
     * @return 底薪计划奖励 一个结果
     */
    @Override
    public AaoCashbackDetails selectAaoCashbackDetailsOne(AaoCashbackDetails aaoCashbackDetails) {
        return aaoCashbackDetailsMapper.selectAaoCashbackDetailsOne(aaoCashbackDetails);
    }

    /**
     * 新增底薪计划奖励
     * 
     * @param aaoCashbackDetails 底薪计划奖励
     * @return 结果
     */
    @Override
    public int insertAaoCashbackDetails(AaoCashbackDetails aaoCashbackDetails) {
        return aaoCashbackDetailsMapper.insertAaoCashbackDetails(aaoCashbackDetails);
    }

    /**
     * 修改底薪计划奖励
     * 
     * @param aaoCashbackDetails 底薪计划奖励
     * @return 结果
     */
    @Override
    public int updateAaoCashbackDetails(AaoCashbackDetails aaoCashbackDetails) {
        return aaoCashbackDetailsMapper.updateAaoCashbackDetails(aaoCashbackDetails);
    }

    /**
     * 删除底薪计划奖励对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAaoCashbackDetailsByIds(String ids) {
        return aaoCashbackDetailsMapper.deleteAaoCashbackDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除底薪计划奖励信息
     * 
     * @param id 底薪计划奖励ID
     * @return 结果
     */
    @Override
    public int deleteAaoCashbackDetailsById(Integer id) {
        return aaoCashbackDetailsMapper.deleteAaoCashbackDetailsById(id);
    }
}
